package com.ope.web.controller.chainresponsibility;

import java.util.Objects;

import com.ope.web.model.DTO.ProcessMointorRequestBody;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;



/**
 * 数据解析 这里要改成异步的，暂时这么写
 * 因为没有带serviceType 这里先做成这样，以后再优化
 */

@Component
@Slf4j
public class TopicDataParser {

    @Autowired
    private TopicDataManager topicDataManager;


    /**
     *
     * @param processMointorRequestBody processMointorRequestBody
     */
    public void dataReporting(ProcessMointorRequestBody processMointorRequestBody) {
        //如果参数为空，则直接跳出
        if (Objects.isNull(processMointorRequestBody)) {
            return;
        }
        topicDataManager.decoder(processMointorRequestBody);
    }


}
